#define _CRT_SECURE_NO_WARNINGS 1
class Solution {
public:
    vector<vector<int>> permutation(vector<int>& nums) {
        vector<vector<int>>s;
        sort(nums.begin(), nums.end());
        do {
            s.push_back(nums);
        } while (next_permutation(nums.begin(), nums.end()));
        return s;
    }
};